<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.1.1.js"></script>
</head>
<style>
    ul li {
        list-style-type: none;
    }

    * {
        margin: 0;
        padding: 0;
    }

    #yiuls {
        width: 340px;
        height: 30px;
        background: url('./bg.jpg') no-repeat;
    }

    #yiuls>li {
        float: left;
        margin-left: 10px;
        width: 100px;
        height: 30px;
        text-align: center;
        line-height: 30px;
        background: url('./libg.jpg') no-repeat;
    }

    #eruls {
        display: none;
    }

    #eruls li {
        width: 100px;
        height: 30px;
        background: url('./libg.jpg') no-repeat;
    }
</style>

<body>
    <ul id="yiuls">
        <li>
            一级菜单
            <ul id="eruls">
                <li>二级菜单</li>
                <li>二级菜单</li>
                <li>二级菜单</li>
            </ul>
        </li>
        <li>
            一级菜单
            <ul id="eruls">
                <li>二级菜单</li>
                <li>二级菜单</li>
                <li>二级菜单</li>
            </ul>
        </li>
        <li>
            一级菜单
            <ul id="eruls">
                <li>二级菜单</li>
                <li>二级菜单</li>
                <li>二级菜单</li>
            </ul>
        </li>
    </ul>
</body>
<script>
    $(document).ready(function () {
        $('#yiuls>li').hover(function () {
            $(this).children('#eruls').stop().show(1000*1)
        }, function () {
            $(this).children('#eruls').stop().hide(1000*1)
        })



    })
</script>

</html>